﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace WebLicenseGenerator
{
	public partial class LicenseDownload : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
			string path = Request.QueryString["p"];
			string name = Path.GetFileName(path);

			Response.AppendHeader("content-disposition", "attachment; filename=" + name);
			Response.ContentType = "text/plain";
			Response.WriteFile(path);
		}
	}
}